www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\admincp\D_add_acticle.asp
<% '************************************************************** ' 新动软网站管理系统 ' 官方网站: http://www.aspcpu.com ' 系统作者: 阮丁远(网名:天下程序) ' Copyright 新动软网站管理系统 版权所有 '************************************************************** %> <LINK href="../css.css" type=text/css rel=stylesheet> <% dir_set="../../" Server.ScriptTimeout = 99999 %> <!--#include file=../../inc/conn.asp--> <!--#include file=../../inc/Functionb.asp--> <!--#include file=../../inc/ajaxLIB.asp--> <!--#include file=../inc/checkadmin2.asp--> <!--#include file=../../inc/functionFiless.asp--> <!--#include file=../inc/inc_sys.asp--> <!--#include file=inc_lanmu_bl.asp--> <% AJAXshowLoader() %> <style type="text/css"> <!-- .STYLE3 { color: #FFFFFF; font-weight: bold; } --> </style> <SCRIPT language=javascript> function cccxc() {//测试此标题是否已经存在 if (document.myform.title.value=='') { window.alert ("请先输入标题!") document.myform.title.focus(); return false; } var tta=document.myform.title.value; var Dreturn = showModalDialog("../D_is_chong_content.asp?ttty=cp&dddd="+tta+"","","dialogHeight: 460px; dialogWidth: 500px; edge: Raised; center: Yes; help: No; resizable: No; status: No; scroll: Yes"); } </SCRIPT> <div id="divProcessing" style="width:200px;height:30px;position:absolute;display:none"> <table border="0" cellpadding="0" cellspacing="1" bgcolor="#000000" width="100%" height="100%"><tr><td bgcolor=#0650D2><marquee align="middle" behavior="alternate" scrollamount="5" style="font-size:9pt"><font color=#FFFFFF>...正在保存远程图片...请等待...</font></marquee></td></tr></table> </div> <br /> <div id="l_list" style="filter:blendTrans(duration=1); width:774px; z-index:-1; border: 1px dashed #999999;left: 3px; top: 120px; height: 121px;width:730px"> <% sys_content_type=trim(request("sys_content_type")) set rs44g=server.CreateObject("adodb.recordset") rs44g.open "select * from ND_channel where sys_content_type_name='"&sys_content_type&"' and lanmu_type='"&lanmu_taba&"'",conn,1,1 if find_dataw(lanmu_taba,rs44g("id"),1)<>"1" and qx_if_max=0 then response.redirect "../D_suodinguser.asp" end if biao="[ND_prod_class]" biaog="[ND_userGroup]" biaosp="[ND_prod_Special]" biao2="[ND_prod]" execute("aaeee=sy"&"s_u"&"r"&"l_"&"g"&"et") execute("aaeee2=sy"&"s_ur"&"l_g"&"et"&"_b") if cstr(aaeee)<>cstr(aaeee2) or aaeee="" then response.redirect "../D_admin"&"_s"&"e.asp" response.end end if if sys_content_type="" then %> <script language="javascript"> alert("url参数sys_content_type不能为空"); </script> <% response.end end if %> <script src="../../ND_editor/FCKeditor2_5/FCKeditor.js"></script> <script type="text/javascript"> <!-- function remoteUpload(o) { try{ var strText = GetContentHTML() ; var divProcessing=document.getElementById("divProcessing"); var objField = document.getElementsByName("content_UploadText")[0]; objField.value = strText ; if (o) { divProcessing.style.top = 800 ; divProcessing.style.left = 200 ; divProcessing.style.display = ""; document.remoteuploadb.submit(); }else{ divProcessing.style.display = "none"; } } catch(e){} } function remoteUploadok() { try{ divProcessing.style.display = "none"; } catch(e){} } function GetContentHTML(){ var strHTML ; try{ var oEditor = FCKeditorAPI.GetInstance('Content') ; strHTML = oEditor.GetXHTML() } catch(e){ strHTML = ''; } return strHTML } var sLinkOriginalFileName = "originalfilename" ; var sLinkSaveFileName = "savefilename" ; var sLinkSavePathFileName = "UploadFileList" ; var sLinkSavePathFileName2 = "UploadFileList2" ; function addUploadFile(originalFileName, saveFileName, savePathFileName){ doInterfaceUpload(sLinkOriginalFileName, originalFileName); doInterfaceUpload(sLinkSaveFileName, saveFileName); doInterfaceUpload(sLinkSavePathFileName, savePathFileName); doInterfaceUpload(sLinkSavePathFileName2, savePathFileName); } function doInterfaceUpload(strLinkName, strValue){ if (strValue=="") return; if (strLinkName){ var objLinkUpload = document.getElementsByName(strLinkName)[0]; if (objLinkUpload){ if (objLinkUpload.value!=""){ objLinkUpload.value = objLinkUpload.value + "|"; } objLinkUpload.value = objLinkUpload.value + strValue; objLinkUpload.fireEvent("onchange"); } } } function doChange(objText, objDrop){ if (!objDrop) return; //if(document.myform.BriefTopic.selectedIndex<2){ // document.myform.BriefTopic.selectedIndex+=1; //} var str = objText.value; var arr = str.split("|"); var nIndex = objDrop.selectedIndex; objDrop.length=1; for (var i=0; i<arr.length; i++){ objDrop.options[objDrop.length] = new Option(arr[i], arr[i]); } objDrop.selectedIndex = nIndex; } //--> </script> <% function next_cen(pid_list,deepth) set rs=server.CreateObject("adodb.recordset") pppcid="-123" if pid_list<>"" then ppplista=split(pid_list,",") ppplistaubd=ubound(ppplista)-1 pppcid=ppplista(ppplistaubd) end if rs.open "select * from "&biao&" where ((deepth="&deepth&" and ((parent_id_list like '%"&pid_list&"%') or (parent_id='"&pppcid&"'))) and sys_content_type='"&sys_content_type&"') order by orders asc",conn,1,1 if pid_list<>"" then lista=split(pid_list,",") numa=ubound(lista) p_id=cstr(lista(numa)) else p_id=0 end if do while not rs.eof pid_list222=rs("parent_id_list")&","&rs("id")&"," deepth222=rs("deepth")+1 set rs2=server.CreateObject("adodb.recordset") rs2.open "select * from "&biao&" where ((deepth="&deepth222&" and ((parent_id_list like '%"&pid_list222&"%') or (parent_id='"&rs("id")&"'))) and sys_content_type='"&sys_content_type&"') order by orders asc",conn,1,1 if rs2.eof then if pid_list<>"" then lista=split(pid_list,",") numa=ubound(lista) p_id=cstr(lista(numa-1)) else p_id=0 end if if p_id=0 then p_id=-1 'response.write "<level1 id="""&rs("id")&""" parentTypeID="""&p_id&""" caption="""&rs("ClassName")&""" PRI=""1"" explain="""&rs("id")&"""/>"&vbcrlf %> <option value="<%=rs("id")%>" <%if cstr(rs("id"))=cstr(request("classid")) then response.write "selected"%>> <%for iiiii1=1 to cint(deepth222) if iiiii1=cint(deepth222) then %> ├<% else %> │<% end if next %><%=rs("classname")%> </option> <% if not rs.eof then rs.movenext if rs.eof or rs.bof then 'response.write "</level0>" 'call next_cen_class(pid_list222,deepth222) exit function else need_benji_next=1 end if else 'response.write "<level0 id="""&rs("id")&""" parentTypeID=""" 'if deepth=0 then response.write "-1" else response.write p_id 'response.write """ caption="""&rs("ClassName")&""" PRI=""2"" explain="""&rs("id")&""" >"&vbcrlf %> <option value="<%=rs("id")%>" <%if cstr(rs("id"))=cstr(request("classid")) then response.write "selected"%>> <%for iiiii1=1 to cint(deepth222) if iiiii1=cint(deepth222) then %> ├<% else %> │<% end if next %><%=rs("classname")%> </option> <% call next_cen(pid_list222,deepth222) if not rs.eof then rs.movenext need_benji_next=1 if rs.eof or rs.bof then 'if deepth<>0 then response.write "</level0>" 'call next_cen_class(pid_list222,deepth222) exit function end if end if if need_benji_next=0 then exit do end if need_benji_next=0 loop end function %> <script language= JavaScript> function SelectPic(){ var arr=window.open('../D_select_upload_pic.asp', '', 'titlebar=no, toolbar=no, scrollbar=yes,Width=800, Height=600'); if(arr!=null){ //var ss=arr.split('|'); //document.all.myform.ImageUrl.value=ss[0]; //document.myform.ImageFileList.value=ss[0]; } else { alert("弹出窗口被系统拦截掉了,请修改你系统设置") } } function SelectPic2(){ var arr=window.open('../D_select_upload_file.asp', '', 'titlebar=no, toolbar=no, scrollbar=yes,Width=800, Height=600'); if(arr!=null){ //var ss=arr.split('|'); //document.all.myform.ImageUrl.value=ss[0]; //document.myform.ImageFileList.value=ss[0]; } else { alert("弹出窗口被系统拦截掉了,请修改你系统设置") } } </script> <form action="D_chk_add_acticle.asp" method="post" target="_self" name="myform" id="myform"> <table height="30" width=730 border="0" cellpadding="2" cellspacing="0" bordercolor="#999999" style="border:#999999 1px"> <tr> <td> <table height="589" width=730 border="0" cellpadding="0" cellspacing="0" bordercolor="#999999"> <tr> <td height="30" align="center" class="adminth" colspan="4"><span class="STYLE3">添加<strong>产品</strong></span></td> </tr> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"><strong>所属产品分类:</strong></td> <td width="720" height="30" align="left" bgcolor="#EDF8FE"> <select size="1" name="classid"> <option value="no">请选择分类</option> <% set rseee=server.CreateObject("adodb.recordset") rseee.open "select * from "&biao&" where sys_content_type='"&sys_content_type&"'",conn,1,1 if rseee.eof then %> <script language="javascript"> alert("没有分类,请先添加分类"); </script> <% response.end end if call next_cen("",0) %> </select> <font color="red">*</font></td> <td width="720" align="left" bgcolor="#FFFFFF"><strong>所属产品专题:</strong></td> <td width="720" align="left" bgcolor="#EDF8FE"> <select size="1" name="spcid"> <% set rseee2=server.CreateObject("adodb.recordset") rseee2.open "select * from "&biaosp&" where sys_content_type='"&sys_content_type&"'",conn,1,1 if rseee2.eof then %> <option value="no">没有专题</option> <% else %> <option value="no">请选择专题</option> <% do while not rseee2.eof %> <option value="<%=rseee2("id")%>"><%=rseee2("Specialname")%></option> <% rseee2.movenext loop end if %> </select></td> </tr> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"><strong>产品名称:</strong></td> <td width="720" align="left" bgcolor="#EDF8FE" colspan="3"><input name="title" type="text" id="title" size="60" value=""> <font color="red">*</font> <input type=button value="检查有无与此产品名称同名称的重复产品" onclick="cccxc();"> </td> </tr> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"><strong>产品型号:</strong></td> <td width="720" align="left" bgcolor="#EDF8FE" colspan="3"><input name="xinghao" type="text" id="xinghao" size="60" value=""> </td> </tr> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"><b>其它选项:</b></td> <td width="720" align="left" bgcolor="#EDF8FE" colspan="3"><input name="is_new" type="checkbox" id="is_new" value="1"> 最新产品 <input name="isBest" type="checkbox" id="isBest" value="1"> 产品推荐 <input name="Forbidac" type="checkbox" id="Forbidac" value="1"> 可以发表评论 <% set rs44g=server.CreateObject("adodb.recordset") rs44g.open "select * from ND_channel where sys_content_type_name='"&sys_content_type&"' and lanmu_type='"&lanmu_taba&"'",conn,1,1 if find_dataw(lanmu_taba,rs44g("id"),8)<>"1" and qx_if_max=0 then %> <input name="issh1" type="checkbox" id="issh1" disabled="disabled" value="0"> <input name="issh" type="hidden" id="issh" value="0"> <%else%> <input name="issh" type="checkbox" id="issh" value="1" checked> <%end if%> 是否已审核</td> </tr> <script language="javascript"> function show1(yn){ ss=yn; if (ss=="1"){ document.getElementById("curl1").style.display=''; } else { document.getElementById("curl1").style.display='none'; } } </script> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"><strong>是否转向连接</strong>: </td> <td width="720" height="30" align="left" bgcolor="#EDF8FE" colspan="3"> <input type="radio" name="isoutLink" value="0" onclick="show1(0)" checked> 否 <input type="radio" name="isoutLink" onclick="show1(1)" value="1"> 是</td> </tr> <tr id="curl1" style="display:none"> <td width="720" height="30" align="center" bgcolor="#ffffff"><strong>转向连接URL</strong> </td> <td width="720" align="left" bgcolor="#EDF8FE" colspan="3"> <input type="text" name="TurnLinkUrl" size="45" value=""></td> </tr> <% set rsss=server.CreateObject("adodb.recordset") rsss.open "select top 1 * from "&biao2&" order by clng(orders) desc",conn,1,1 if rsss.eof then ncxx="1" else ncxx=cstr(rsss("orders")+1) end if %> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"><strong>产品次序</strong> </td> <td width="720" align="left" bgcolor="#EDF8FE" colspan="3"> <input type="text" name="orders" size="45" value="<%=ncxx%>"></td> </tr> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"><strong>是否显示在线订购</strong>: </td> <td width="720" height="30" align="left" bgcolor="#EDF8FE" colspan="3"> <input type="radio" name="isbuy" value="0" > 否 <input type="radio" name="isbuy" value="1" checked> 是</td> </tr> <!-------------------------------8.5.2- 1--------------------> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"><strong>产品价格</strong>: </td> <td width="720" height="30" align="left" bgcolor="#D2EEFD" colspan="3"> 市场价: <input type="text" name="chicj_00" size="18" value=""><br /> <% function findx_price(grade_id,str) rst2="" if str<>"" then other_params=split(str,"|") for i=0 to ubound(other_params) sss11=split(other_params(i),":") sss11a=sss11(0) sss11b=sss11(1) if cstr(sss11a)=cstr(grade_id) then rst2=sss11b exit for end if next end if if isnumeric(rst2)<>true then rst2="" end if findx_price=rst2 end function set rsrr=server.CreateObject("adodb.recordset") sql="select * from [ND_userGroup] where id<>1 order by clng(grades) asc" rsrr.open sql,conn,1,1 do while not rsrr.eof %> <%=rsrr("name")%>价:<input type="text" name="chicj_<%=rsrr("id")%>" size="18" value=""><br /> <% rsrr.movenext loop %> </td> </tr> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"><strong>产品库存数量</strong>: </td> <td width="720" height="30" align="left" bgcolor="#F4FCFF" colspan="3"> <input type="text" name="numx" size="18" value="10">(卖出1件后自动减1,默认为10) </td> </tr> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"><strong>购买一件后送的积分</strong>: </td> <td width="720" height="30" align="left" bgcolor="#F4FCFF" colspan="3"> <input type="text" name="score" size="18" value="5"> </td> </tr> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"><strong>浏览等级</strong> </td> <td width="720" align="left" bgcolor="#EDF8FE" colspan="3"> <select size="1" name="liulanggroup"> <% set rs8=server.CreateObject("adodb.recordset") rs8.open "select * from "&biaog&" order by clng(grades) asc",conn,1,1 do while not rs8.eof %> <option value='<%=rs8("id")%>' ><%=rs8("name")%></option> <%rs8.movenext loop %> </select></td> </tr> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"><strong><b>相关</b>产品:</strong></td> <td width="720" align="left" bgcolor="#EDF8FE" colspan="3"> <input name="Related" type="text" id="Related" size="60" value=""></td> </tr> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"><b>更新时间:</b></td> <td width="720" align="left" bgcolor="#EDF8FE" colspan="3"><input name="WriteTime" type="text" id="WriteTime" size="25" value="<%=Now()%>"> <font color="red">*</font> <b>分页设置:</b> <input type="radio" name="AutoPages" value="1"/> 自动分页 <input type="radio" name="AutoPages" value="0" checked/> 手动分页 </td> </tr> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"><b>上传图片:</b></td> <td width="720" align="left" bgcolor="#EDF8FE" colspan="3"><iframe name="image" frameborder="0" width='100%' height="69" scrolling="no" src="../D_upfile.asp"></iframe></td> </tr> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"> <strong><b>产品介绍:</b></strong><br> 产品介绍分页标签<br>[page_fenye]<br>请注意标签字母小写</td> <td width="720" align="left" bgcolor="#EDF8FE" colspan="3"> <textarea name="Content" id="Content" style="display:none"></textarea> <script type="text/javascript"> <!-- var oFCKeditor = new FCKeditor('Content') ; oFCKeditor.BasePath = '../../ND_editor/FCKeditor2_5/' ; oFCKeditor.ToolbarSet = 'Default' ; oFCKeditor.Width = '600' ; oFCKeditor.Height = '500' ; oFCKeditor.Value = '' ; oFCKeditor.ReplaceTextarea() ; var oEditorb; function FCKeditor_OnComplete( editorInstance ) { //alert("3423"); oEditorb = FCKeditorAPI.GetInstance('Content') ; } function updatefck(str){ oEditorb.SetHTML(str); } //--> </script></td> </tr> <tr> <td width="720" height="34" align="center" bgcolor="#ffffff"><b>保存远程图片:</b></td> <td width="720" colspan="3" align="left" valign="top" bgcolor="#EDF8FE"> <input name="AutoRemote" type="button" onClick="remoteUpload(1);" value='开始保存远程图片'> </td> </tr> <tr> <td width="720" height="74" align="center" bgcolor="#ffffff"><b><strong><b>产品小图</b></strong>:</b></td> <td width="720" colspan="3" align="left" valign="top" bgcolor="#E2F4FE"><input name="ImageUrl" type="text" id="ImageUrl" size="60" value="" onpropertychange="document.all.pre.src=this.value;"> <input type="hidden" name="UploadFileList" id="UploadFileList" onChange="doChange(this,document.myform.ImageFileList)" value=""> <br>直接从上传图片中选择: <select name="ImageFileList" id="ImageFileList" onChange="ImageUrl.value=this.value;"><option value=''>不选择产品小图</option></select> <input type='button' name='selectpic' value='从已上传图片中选择' onclick='SelectPic()' class="button"> <br /> 预览:<img src="../images/bl.gif" width="80" height="72" id="pre"/></td> </tr> <tr> <td width="720" height="74" align="center" bgcolor="#ffffff"><b><strong><b>产品大图</b></strong>:</b></td> <td width="720" colspan="3" align="left" valign="top" bgcolor="#E2F4FE"><input name="filePath" type="text" id="filePath" size="60" value="" onpropertychange="document.all.pre2.src=this.value;"> <input type="hidden" name="UploadFileList2" id="UploadFileList2" onChange="doChange(this,document.myform.ImageFileList2)" value=""> <br>直接从上传图片中选择: <select name="ImageFileList2" id="ImageFileList2" onChange="filePath.value=this.value;"><option value=''>不选择产品大图</option></select> <input type='button' name='selectpic' value='从已上传图片中选择' onclick='SelectPic2()' class="button"> <br /> 预览:<img src="../images/bl.gif" width="80" height="72" id="pre2"/></td> </tr> <tr> <td width="720" height="30" align="center" bgcolor="#ffffff"><b>初始点击数:</b></td> <td width="720" align="left" bgcolor="#EDF8FE" colspan="3"><input name="AllHits" type="text" id="AllHits" size="15" value="0"> <font color=red>*</font></td> </tr> <tr> <td width="720" height="30" align="center" bgcolor="#D5EFFD" colspan="4"> <input type="submit" value="添 加" /></td> </tr> <tr> <td width="720" height="80" align="center" bgcolor="#ffffff" colspan="4"></td> </tr> </table> </td> </tr> </table> <input type="hidden" name="sys_content_type" value="<%=request("sys_content_type")%>"/> <input type="hidden" name="cid" value="<%=request("cid")%>"/> </form> <form name="remoteuploadb" id="remoteuploadb" action="../D_remoteupload.asp" method="post" target="remoteupload"> <input type="hidden" name="content_UploadText" value=""/> </form> <iframe name="remoteupload" width="0" height="0"></iframe> </div> <script language=javascript> AJAXfade(1,'l_list') </script> <% AJAXcloseLoader() %>